Using heart beats to monitor operational state of service classes of a QoS aware network link

ABSTRACT

Some embodiments provide a method for quantifying quality of several service classes provided by a link between first and second forwarding nodes in a wide area network (WAN). At a first forwarding node, the method computes and stores first and second path quality metric (PQM) values based on packets sent from the second forwarding node for the first and second service classes. The different service classes in some embodiments are associated with different quality of service (QoS) guarantees that the WAN offers to the packets. In some embodiments, the computed PQM value for each service class quantifies the QoS provided to packets processed through the service class. In some embodiments, the first forwarding node adjusts the first and second PQM values as it processes more packets associated with the first and second service classes. The first forwarding node also periodically forwards to the second forwarding node the first and second PQM values that it maintains for the first and second service classes. In some embodiments, the second forwarding node performs a similar set of operations to compute first and second PQM values for packets sent from the first forwarding node for the first and second service classes, and to provide these PQM values to the first forwarding node periodically.

In recent years, several companies have brought to market solutions for deploying software defined (SD) wide-area networks (WANs) for enterprises. Some such SD-WAN solutions use external third-party private or public cloud datacenters (clouds) to define different virtual WANs for different enterprises. These solutions typically have edge forwarding elements (called edge devices) at edge nodes of an enterprise that connect with one or more gateway forwarding elements (called gateway devices or gateways) that are deployed in the third-party clouds.

In such a deployment, an edge device connects through one or more secure connections with a gateway, with these connections traversing one or more network links that connect the edge device with an external network. Examples of such network links include MPLS links, 5G LTE links, commercial broadband Internet links (e.g., cable modem links or fiber optic links), etc. The edge nodes include branch offices (called branches) of the enterprise, and these offices are often spread across geographies with network links to the gateways of various different network connectivity types.

In existing WAN and SD-WANs, there is a lack of proper error resilient transport methods for QoS aware links. Retransmission of lost packets, packet replication and forward-error correction (FEC) are some known methods to provide transport error resiliency. These methods can also be adaptively turned on based on the PQM values on the path. Retransmission method detects packet loss and makes a decision to resend the lost packet. The fundamental need for all these methods is to constantly measure path quality metrics (PQMs), such as loss, delay and jitter, between two WAN endpoints. PQM can be measured by tagging each packet with an incremental number (sequence number) and timestamp.

These common methods cannot be easily applied in QoS aware links. The QoS aware links can treat packets differently depending on the service to which it is entitled. For instance, in a transit QoS device, packets can be placed in different scheduler service queues or policed/capped/dropped at a different rate depending on its type. However, when the packets get mapped to different scheduler queues in the transit QoS device, packets sent in sequence (with sequence numbers carried in packet) from one WAN edge endpoint can get out of ordered before it reaches the other WAN edge endpoint. The out of order delivery prevents proper packet loss computation on the path between two WAN endpoints, and can potentially lead to wrong packet PQM value calculations.

Traffic outage reports on the path also cannot be relied on. A path (i.e., a connection) between two WAN endpoints can experience outages due to severe congestion and subsequent drops in transit QoS device. To quickly detect and failover to alternate path, existing WAN send heartbeat messages periodically once every X millisecond between two forwarding elements along the path. Loss of certain Y consecutive heartbeat messages can be used to quickly detect path outages and move traffic to alternate paths available between the same endpoints.

Such existing path outage detection does not work for QoS aware links because the heartbeat message sent on a QoS aware link will get mapped to the same service queue in the transit QoS device. For instance, in an MPLS link, a WAN edge node typically sends heartbeat messages with a default DSCP tag or a specific DSCP tag. This causes all the heartbeat messages to be serviced out from the same service queue in the transit QoS device. This will lead to the loss of heartbeat messages and the path can be marked down, even though other queues are not experiencing any congestion and are in good state to process traffic.

A high loss of heartbeats can be associated with a path that is unfit to carry a particular application traffic. The unfit state of a path can be detected by checking whether the path's PQM values are within a threshold of acceptable values. The existing methods will not work for a QoS aware links because there could be a high loss in one of the service queues of the QoS aware link but this shall reflect as a high loss in whole of that path and the entire path can be marked as unusable for traffic steering. But a potential possibility is that other service queues could be uncongested and have free bandwidth for use. This leads to highly inefficient bandwidth usage and which in turn can lead to bad application traffic performance.

BRIEF SUMMARY

Some embodiments provide a method for quantifying quality of several service classes provided by a network link used to establish a path between first and second forwarding nodes in a wide area network (WAN). At a first forwarding node, the method (1) computes first and second path quality metric (PQM) values based on packets sent from the second forwarding node for the first and second service classes, and (2) uses these PQM values to manage the packet processing through these service classes. In some embodiments, an example of a network link that offers several service classes include an MPLS (multi-path label switching) link, while examples of forwarding nodes include edge nodes deployed in branch offices, edge nodes deployed in datacenters, and gateways deployed in public or private cloud datacenters.

In some embodiments, the forwarding nodes of the WAN (including the first and second forwarding nodes) are part of an overlay network that is established by using overlay network headers for the packets. The overlay network is a software-defined (SD) WAN in some embodiments. The forwarding nodes of the SD-WAN in some embodiments use encapsulating tunnel headers to allow the packet's overlay network headers to be transparent to the underlay network fabric that the packets traverse.

Also, in some embodiments, the different service classes are associated with different quality of service (QoS) guarantees that the WAN offers to the packets. Examples of such guarantees include throughput, uptime reliability, etc. A network link with two or more service classes is referred to below as a QoS aware link. In some embodiments, the computed PQM value for each service class quantifies the QoS provided to packets processed through the service class.

In some embodiments, the first forwarding node adjusts the first and second PQM values as it processes more packets associated with the first and second service classes. The first forwarding node periodically forwards to the second forwarding node the first and second PQM values that it maintains for the first and second service classes. In some embodiments, the second forwarding node performs a similar set of operations to compute first and second PQM values for packets sent from the first forwarding node for the first and second service classes, and to provide these PQM values to the first forwarding node periodically. Each forwarding node uses the first and second PQM values received by the other forwarding node to assess the quality of the first and second service classes for forwarding data packets to the other forwarding node.

To differentiate the first and second service classes, the first forwarding node uses different sets of sequence numbers for these service classes. In some embodiments, each service class has a sequence number range (called the primary sequence number range) that is formed by an identifier of the service class plus another sequence number range (called the secondary sequence number range). The different service classes in some embodiments can use the same secondary sequence number range as their primary sequence number range because of their different service class identifiers. In some SD-WAN embodiments that use MPLS, the service class identifier is the DSCP (differentiated service code point) tag associated with the service class. In other embodiments that use MPLS, the service class identifiers are not the DSCP tags.

The forwarding nodes compute different PQM values in different embodiments. For instance, for each service class, each forwarding node in some embodiments computes packet loss, delay and jitter as three PQM values for the service class. To compute PQM values for each service class, a forwarding node uses the sequence numbers associated with the packets to differentiate the service classes associated with the packets. For example, to compute packet loss for a service class, the forwarding node in some embodiments uses the sequence numbers of the service classes to maintain counts of packets that are not received timely and sequentially, and uses the time average of this count as the average packet loss for the service class.

To compute the packet delay for the service class, the forwarding node in some embodiments computes (1) a delay value for each packet by computing a difference between a time stamp contained in the packet's header and the time the forwarding node received the packet, and (2) averages this delay with other delay values it computed for packets associated with the same service class. Again, the forwarding node identifies the packets associated with the same service class based on the packet sequence numbers that are associated with the service class. The forwarding node in some embodiments computes the packet jitter as a derivative of the packet delay values that it computes (i.e., based on the rate of change of the delay value).

Computing PQM values for each service class allows some embodiments to treat each service class as an independent logical sub-path of the path between first and second forwarding nodes that is established by one network link. Hence, when one service class is congested, the forwarding nodes can reduce or eliminate their use of this service class while continuing to use the other service classes offered by the network link. Some embodiments generate PQM values for the service classes instead of service queue configurations, because the service queue configuration can be implemented in several different ways in the backbone and the access links of a WAN.

Different embodiments have different uses for the PQM values computed for the different service classes. For instance, some embodiments use the sub-path PQM values to generate sub-path usability state values (i.e., service class usability state values). In some embodiments, the path usability state values include an operational state signifying that the service class is operational, a degraded state signifying that the service class is congested or for some other reason is not providing the desirable service level, and a failed state signifying that the service class is not operational and should not be used.

To generate the usability state value for each service class, the method of some embodiments compares one or more PQM values for the service class with one or more threshold values that are specified (e.g., by a network administrator) for the service class, and designates the service class as degraded or failed when the PQM values do not meet their respective threshold values (e.g., are not below their threshold values). In some embodiments, a PQM value type has one threshold for marking the service class as degraded and another threshold for marking the service class as failed. Some embodiments compute a blended score (e.g., a weighted sum) from two or more PQM values for a service class, and compare this blended score with two threshold values to determine whether the service class should be designated as failed or degraded.

When a service class is designated as failed, the packet-transmitting forwarding node in some embodiments does not use the service class and generates an alert (e.g., a notification email, text, or other report) to network administrator that the network connection for the service class should be examined. When the service class is designated as degraded, the forwarding node in some embodiments does not use the service class in some embodiments, while in other embodiments the forwarding node uses this service class for fewer packets that it transmits through the network link.

Also, when the service class is degraded, the forwarding node in some embodiments generates an alert (e.g., a notification email, text, or other report) to network administrator that the network connection for the service class should be examined. However, irrespective of whether one service class is designated as failed or degraded, some embodiments continue using one or more other operational service classes that are associated with the network link (i.e., one or more service classes that have an operational state). This is because the maintenance of operational states for all the service classes of a QoS aware network link, allows one or more service classes of a network link to remain fully operational even through one or more service classes are designated as failed or degraded.

Some embodiments use the sub-path PQM values to distribute egress traffic from a forwarding node to different network links. To do this distribution for a received packet associated with a particular service class at a first forwarding node that has at least first and second network links that connect the node to the WAN, the method of some embodiments retrieves first and second path quantifying metric (PQM) values for the particular service class of the first and second network links.

Based on the first and second PQM values, the method selects one of the network links, (e.g., the first network link) for the packet, and then forwards the packet along the particular service class of the selected network link (e.g., the first network link). To forward the packet along the particular service class of the selected network link, the method associates the packet with the sequence number for the particular service class of the selected network link. Some embodiments perform the packet distribution among the network links on a per packet basis, while other embodiments perform this packet distribution on a per flow basis.

For the received packet, the method of some embodiments initially identifies the service class associated with the packet. The method in some embodiments performs this identification through a classification operation (e.g., through a match operation that matches the packet header values with an identifier of a classification rule that provides the service class), while in other embodiments identifies the packet's service class through service class identifier that is contained in a header of the packet or otherwise specified for the packet by another element in the network.

In some embodiments, a forwarding node connects to the WAN through multiple network links, two or more of which have several service classes with each class having its own set of one or more PQM values. Hence, to select the network link for a packet that is associated with the particular service class, the method in some embodiments identifies a set of one or more PQM values associated with the particular service class for each of the first and second network links, and then selects the network link that has the best PQM value set (e.g., the smallest PQM loss or delay value) for the particular service class.

Different types of PQM values are important for different packet flows. Hence, in some embodiments, the method selects a network link for the packet by selecting the PQM value type that is most important to the packet's flow, and then using this type's PQM values of the particular class to select the network link with the “best” PQM value. In other embodiments, the method computes a blended score (e.g., a weighted sum) from two or more PQM values of each network link in order to identify the network link with the best blended score as the network link for the received packet.

Instead of just picking the network link that offers the best PQM value or set of PQM values for a received packet associated with a particular service class, some embodiments perform a load balancing operation to distribute the load across two or more network links that offer the particular service class. This load balancing operation in some embodiments relies on load balancing criteria that are computed based on the PQM values that are computed for the particular service class for the two or more service classes.

The load balancing criteria in some embodiments are weight values that are computed based on the PQM values. In some embodiments, the weight values are also computed based on the depth of queues used to temporarily store packets before they are transmitted by the schedulers of the forwarding nodes. The load balancing operation in some embodiments can be performed on a per-flow basis or per-packet basis. When performed on a per-packet basis, the packets of one flow can be split in two or more streams that are sent along two or more network links that offer the desired service class for the packet. This increases the egress rate of the forwarding node for the flow as it allows the flow's packets to use the available throughput of multiple network links that offer the QoS for the particular service class.

Instead of using static service class assignments based on classification rules or service class identifications in packet headers, some embodiments dynamically select a service class for a packet by analyzing the PQM values computed for the service classes and selecting the service class that offers the best PQM value(s) at the time that the packet is being processed by the forwarding node. To dynamically select the service class for a packet, the method of some embodiments retrieves at least two PQM values (called first and second PQM values) respectively for at least two service classes (called first and second service classes below) associated with a network link.

The method then selects for the packet the service class (e.g., the first service class) that has the best retrieved PQM value. The method next associates the packet with the selected service class, and forwards the packet with the associated selected service class to another forwarding node along the network link. To associate the packet with the selected service class, the method in some embodiments associates the packet with the identifier of the selected service class (e.g., its DSCP tag) and/or the sequence number for the selected service class.

The dynamic selection and association of a service class for a packet allows packets of a critical application to always use service classes that provide the best PQM values at any given time. In some embodiments, the dynamic selection of the service class can be based on the type of PQM value that is most important to the critical application. For instance, only a minimal level of jitter might be acceptable for a particular application. Hence, for this application, the method of some embodiments uses the computed jitter values of the service classes of a network link to select one service class for the packets of the particular application. In this manner, the dynamic selection of the service classes can itself be a function of the application type. Instead of dynamically selecting and associating a service class on a per-packet basis, other embodiments dynamically select and associate a service class on a per-flow basis. Some of these embodiments perform this dynamic selection and association when processing the first packet of the flow.

The service class PQM values provide one manner for evaluating the state of each service class of a QoS aware network link. Service-class (SC) monitoring messages provide another way for evaluating the service class operational states. The SC monitoring messages in some embodiments are liveness messages (also called heartbeat messages) exchanged between two forwarding nodes for each service class on a QoS aware network link (i.e., on a network link with multiple service classes).

When it is desirable to reduce the amount of monitoring messages in the WAN, some embodiments use SC monitoring messages only for a subset of the service classes of a network link, while assessing quality of one or more other service classes of the network link by using the PQM values maintained at the second forwarding node for the other service classes. The subset of service classes in some embodiments are the critical service classes that are used to forward packets of critical application.

Some embodiments use both SC monitoring messages and PQM values to assess the state of a service class because the two different mechanisms have different strengths and weaknesses. The SC monitoring messages offer a fast way of detecting the degradation or failure of a service class. However, the SC monitoring messages in some cases might not detect all undesirable performance characteristics of a service class. For such situations, the PQM values are useful in detecting the service class degradation or failure.

The preceding Summary is intended to serve as a brief introduction to some embodiments of the invention. It is not meant to be an introduction or overview of all inventive subject matter disclosed in this document. The Detailed Description that follows and the Drawings that are referred to in the Detailed Description will further describe the embodiments described in the Summary as well as other embodiments. Accordingly, to understand all the embodiments described by this document, a full review of the Summary, the Detailed Description, the Drawings, and the Claims is needed. Moreover, the claimed subject matters are not to be limited by the illustrative details in the Summary, the Detailed Description, and the Drawings.

BRIEF DESCRIPTION OF FIGURES

The novel features of the invention are set forth in the appended claims. However, for purposes of explanation, several embodiments of the invention are set forth in the following figures.

FIG. 1 conceptually illustrates the components of two WAN forwarding nodes that independently treat each service class in a multi-class link between the two forwarding nodes.

FIG. 2 illustrates a process that the transmit-side components of a forwarding node perform in some embodiments to associate a packet that it receives with a service class.

FIG. 3 illustrates a process that the receive-side components of a forwarding node perform in order to process a packet that is received for a service class of a QoS aware link.

FIG. 4 illustrates a process that the PQM calculator of the receive-side components of a WAN forwarding node of some embodiment performs repeatedly.

FIG. 5 illustrates a process that specifies state values for service classes of a QoS aware link between two WAN forwarding nodes.

FIG. 6 illustrates a process that the SCMM generator of the transmit-side forwarding node component performs to periodically generate SC monitoring message for each service class.

FIG. 7 illustrates a process that the SCMM tracker of the receive-side components of a forward node performs in some embodiments to process SC monitoring messages for a service class of a QoS aware link for which the SC message generator sends monitoring messages.

FIG. 8 illustrates a process that a forwarding node of FIG. 9 uses to distribute egress traffic to another forwarding node through two or more different network links that serve as alternative paths to the other forwarding node.

FIG. 9 illustrates an edge WAN forwarding node forwarding packet flows to another edge WAN forwarding node through one of three different paths between them.

FIG. 10 illustrates an example of transmit-side components of a forwarding node that perform a load balancing operation.

FIG. 11 illustrates a process performed by a weight calculator of FIG. 10 in some embodiments.

FIG. 12 illustrates a process performed by the load-balancer of FIG. 10 in some embodiments.

FIG. 13 illustrates a process that dynamically selects the service class for a packet or flow.

FIG. 14 conceptually illustrates an electronic system with which some embodiments of the invention are implemented.

DETAILED DESCRIPTION

In the following detailed description of the invention, numerous details, examples, and embodiments of the invention are set forth and described. However, it will be clear and apparent to one skilled in the art that the invention is not limited to the embodiments set forth and that the invention may be practiced without some of the specific details and examples discussed.

Some embodiments of the invention provide methods for improving the use of the service classes provided by a link between first and second forwarding nodes in a wide area network (WAN). The different service classes in some embodiments are associated with different quality of service (QoS) guarantees that the WAN offers to the packets. Examples of such guarantees include throughput, uptime reliability, etc. A network link with two or more service classes is referred to below as a QoS aware link.

To improve the usage of a QoS aware link with multiple service classes, some embodiments treat each service class as an independent logical sub-path of the path that the network link establishes between the first and second forwarding nodes. For instance, when one service class has failed or is degraded, the forwarding nodes can eliminate or reduce their use of this service class while continuing to use the other service classes offered by the network link.

To treat each service class of a multi-class link as its own independent logical sub-path, some embodiments compute path quality metric (PQM) values for each independent service class and use service-class (SC) monitoring messages (also called liveness or heartbeat messages in this document) for each independent service class. Some embodiments facilitate the computation of PQM values and the exchange of SC-monitoring messages by associating the packets transmitted for each service class with a set of sequence numbers that are unique to the service class, and associating the SC-monitoring messages with different service class identifiers.

As used in this document, QoS aware links are wired or wireless WAN links that treat packets differently based on unique identifiers associated with the packets. Unique identifier for a packet can be a value computed from the packet or carried in the packet header itself. Based on the unique identifiers, packets can be put in different scheduling queue, rate-limited/policed with different bandwidth capacities, and/or applied with different drop policies. An example of one such link is MPLS. MPLS links provide different class of service that is assigned based on the DSCP tag carried in the packet. The class of service policy is applied in every transit device in the QoS Aware path connecting between two WAN endpoints (e.g., two edge forwarding nodes of an SD-WAN).

Service classes are a set of classes that the QoS aware links support. In the case of MPLS, it supports 8 classes. Service queues are number of scheduler queues that a QoS aware link uses. The service classes are assigned to the service queues. A transit QoS device or node is an upstream networking device or node that applies the QoS policies to make the path a QoS aware one. It can be the next hop or could be a transit device in the backbone that connect the two WAN edge endpoints. In MPLS world, this can be a provider edge or provider MPLS router.

WAN edge node is a network device that acts as a gateway to the Internet and other WAN edge nodes. It can be located in a branch or headquarters (hub) or in cloud or as a gateway in public or private cloud. A path between two WAN edge nodes represents end-to-end connectivity between the two nodes. When there are multiple destination endpoints, there can be more than one path made from the same link.

A WAN edge node can have multiple WAN links available for communicating to other WAN edges nodes or to the Internet. It is possible that one or more of those links can have QoS Awareness and other could be generally available public broadband links (non QoS aware). The ability of the WAN solution to make best use of the heterogenous link types on a WAN edge node is further referred as hybrid WAN link support.

FIG. 1 presents a conceptual illustration of the components of two WAN forwarding nodes 102 and 104 that independently treat each service class in a multi-class link 190 between the two forwarding nodes. These components treat the service classes independently by exchanging the SC-monitoring messages for each service class with the service class identifier, and associating the data packets forwarded by each service class with sequence numbers that are unique to that service class.

In some embodiments, the forwarding nodes 102 and 104 are part of a software-defined WAN (an SD-WAN) that is an overlay network established by using overlay network headers for the packets. The forwarding nodes of the SD-WAN in some embodiments use encapsulating tunnel headers to allow the packet's overlay network headers to be transparent to the underlay network fabric that the packets traverse. Also, the link 190 is a multi-service class link, such as an MPLS (multi-path label switching) link. In some embodiments, the SD-WAN that is established by the forwarding nodes 102 and 104 belongs to an enterprise or an entity with offices and/or datacenters. In some of these embodiments, examples of forwarding nodes 102 and 104 are edge and hub nodes deployed in branch offices, edge and hub nodes deployed in datacenters, and gateways deployed in private and public cloud datacenters.

In this example, each forwarding node 102 or 104 has similar transmit-side components 112 and receive-side components 114. To keep the illustration simple, only the transmit-side components 112 of the forwarding node 102 and the receive-side components 114 of the forwarding node 104 are shown in FIG. 1. Also, in some embodiments, the transmit-side processing and the receive-side processing of the forwarding node are performed by the same set of components.

The transmit- and receive-side components have different software implementations (e.g., open virtual switch, open flow, virtual router, etc.) and/or hardware implementations (e.g., hardware forwarding ASICs offered by such companies as Broadcom and Intel), on computers and/or standalone network appliances. In some embodiments, each forwarding node's components are implemented by one device (e.g., one computer or appliance), while in other embodiments each node's components are implemented by multiple devices (e.g., multiple computers).

The transmit-side components 112 of the forwarding node 102 include one or more ingress processing pipelines 122, one or more egress processing pipelines 124, several service-class queues 126 in between the ingress and egress processing pipelines, and schedulers 128 for the SC queues. In some embodiments that implement the forwarding node with a hardware ASIC, the processing pipelines of a forwarding node include one or more stages of match-action units that (1) perform match operations based on packet attributes (e.g., header values) and then (2) perform action operations on the packets based on the actions associated with the matching records. In some embodiments that implement the forwarding node as a software forwarding node, the processing pipelines are implemented fully or partially by match-action operations performed by one or more software forwarding elements (e.g., switches, routers, etc.).

As shown in FIG. 1, the ingress packet processing pipeline 122 on the transmit-side components 112 in some embodiments implement a service class processor 132, a PQM monitor 134, and SC message generator 136. One or more of these three components 132, 134 and 136 in other embodiments are implemented as part of the egress processing pipeline 124 of the transmit-side component 112. The illustration in FIG. 1 offers just one example of an implementation of the transmit- and receive-side components of a forwarding node in an SD-WAN of some embodiments.

In some embodiments, the SC processor 132 identifies the service classes associated with the packets. In some embodiments, the SC processor can be configured to identify the service classes for the packets based on one or more techniques. For instance, in some embodiment, the SC processor identifies the packet's service class through the service class identifier that is contained in a header of the packet, or otherwise specified for the packet, by another element in the network.

Conjunctively, or alternatively, the SC processor in some embodiments performs a classification operation that matches the packet header values with an identifier of a classification rule that provides the service class. In some embodiments, some match-action rules include (1) match identifiers that have header values associated with high priority applications (e.g., IP addresses or port addresses of high priority applications), and (2) action identifiers that provide identifiers of high priority service classes to use for the high priority applications, while other match-action rules include (1) match identifiers that have header values associated with low priority applications (e.g., IP addresses or port addresses of low priority applications), and (2) action identifiers that provide identifiers of low priority service classes to use for the low priority applications. In still other embodiments, the SC processor 132 dynamically selects the service class for a packet or flow, as further described below.

After identifying a service class for a packet, the SC processor 132 associates the packet with the identifier of the identified service class and with a sequence number from a range of sequence numbers used for the identified service class. FIG. 1 illustrates the SC processor 132 using different sequence number counters to obtain different sequence numbers for packets of different service classes. In some embodiments, each SC counter 131 maintains a current packet count for each service class, and increments this count as it provides the next sequence number for a service class to the SC processor 132. FIG. 1 also illustrates a list 151 of service class identifiers that identify the different service classes, and the SC processor's use of this list.

As mentioned above, some embodiments use different sets of sequence numbers for the service classes to differentiate the different service classes (i.e., to treat the different service classes as different logical sub-paths). In some embodiments, each service class has a sequence number range (called the primary sequence number range) that is formed by an identifier of the service class plus another sequence number range (called the secondary sequence number range). The different service classes in some embodiments can use the same secondary sequence number range as their primary sequence number range because of their different service class identifiers. In some SD-WAN embodiments that use MPLS, the service class identifier is the DSCP (differentiated service code point) tag associated with the service class. In other embodiments that use MPLS, the service class identifiers are not the DSCP tags.

During the packet processing in the ingress and/or egress pipelines, some embodiments tag the packet with the service class identifier and the sequence number, which in some embodiments is just a sequence number from the secondary sequence number range mentioned above that is made into a unique sequence number by combining it with the service class identifier. When the packet is transmitted to the other forwarding node, its associated service class identifier and sequence number are inserted in the header (e.g., the overlay network header, an encapsulating header or an MPLS header) of the packet.

The PQM monitor 134 maintains in a statistic storage 135 the PQM values that it receives for each service class from the receive-side PQM calculator 154, which will be described below. Examples of these metrics include packet loss, delay and jitter for each service class. In some embodiments, the PQM monitor 134 uses the service class PQM values (also called sub-path PQM values) to generate service class usability state values (i.e., sub-path usability state values) that it stores in a state storage 137. In other embodiments, the PQM monitor 134 receives these usability state values from the receive-side PQM calculator 154.

In some embodiments, the path usability state values include an operational state signifying that the service class is operational, a degraded state signifying that the service class is congested or for some other reason is not providing the desirable service level, and a failed state signifying that the service class is not operational and should not be used. To generate the usability state value for each service class, the PQM monitor 134 (or the PQM calculator 154) of some embodiments compares one or more PQM values for the service class with one or more threshold values that are specified (e.g., by a network administrator) for the service class, and designates the service class as degraded or failed when the PQM values do not meet their respective threshold values (e.g., are not below their threshold values).

In some embodiments, a PQM value type has one threshold for marking the service class as degraded and another threshold for marking the service class as failed. Some embodiments compute a blended score (e.g., a weighted sum) from two or more PQM values for a service class, and compare this blended score with two threshold values to determine whether the service class should be designated as failed or degraded. For instance, in some embodiments, the PQM monitor 134 (or the PQM calculator 154) computes a weighted sum of the loss, delay and jitter values for a service class and then compares this sum with two threshold values for the service class, in order to determine whether the service class should be designated as failed or degraded. The weighted sum in some embodiments is computed by multiplying the different PQM values (e.g., loss, delay and jitter) with different weights before summing the result of the multiplications.

When a service class is designated as failed, the packet-transmitting forwarding node in some embodiments does not use the service class and generates an alert (e.g., a notification email, text, or other report) to network administrator that the network connection for the service class should be examined. When the service class is designated as degraded, the forwarding node in some embodiments does not use the service class in some embodiments, while in other embodiments the forwarding node uses this service class for fewer packets that it transmits through the network link.

Also, when the service class is degraded, the forwarding node in some embodiments generates an alert (e.g., a notification email, text, or other report) to network administrator that the network connection for the service class should be examined. For instance, in some embodiments, the service class processor 132 accesses the service class usability states and reduces or eliminates associating packets to service classes that have degraded or failed usability states. However, irrespective of whether one service class is designated as failed or degraded, the forwarding nodes in some embodiments continues using one or more other operational service classes that are associated with the network link (i.e., one or more service classes that have an operational state). This is because the maintenance of operational states for all the service classes of a QoS aware network link, allows one or more service classes of a network link to remain fully operational even through one or more service classes are designated as failed or degraded.

The service class PQM values provide one manner for evaluating the state of each service class of a QoS aware network link. Service-class (SC) monitoring messages provide another way for evaluating the service class operational states. The SC monitoring messages in some embodiments are liveness messages (also called heartbeat messages) exchanged between two forwarding nodes for each service class on a QoS aware network link (i.e., on a network link with multiple service classes).

In some embodiments, the SC monitoring message (SCMM) generator 136 of the transmit-side forwarding node component 112 periodically generates SC monitoring message for each service class, and associates each service class' monitoring messages with the identifier of the service class. These messages are then sent from the transmit-side forwarding node to the other node, which, as described below, has a SCMM tracker 156 that generates state values for the service classes based on loss values that it tracks for monitoring messages of the service classes.

After the transmit-side ingress-pipeline processing for a packet is completed in the example illustrated in FIG. 1, the packet is stored in a service queue 126 associated with the service class identified for the packet. Packets are read out of the service queues 126 based on egress rates specified by the schedulers 128 for these queues. In some embodiments, each service class' scheduler specifies a rate that is commensurate with the QoS metrics associated with the service class. The duration that a packet stays in the service queue for its service class depends not only on the egress rate specified by the queue's scheduler but also based on the queue's congestion (i.e., the number of earlier packets in the queue).

When the transmit-side forwarding node includes a forwarding ASIC, the service queues in some embodiments are part of a cross bar switching fabric between the different ingress and egress pipelines. In other embodiments, the service queues are storage locations in the forwarding elements memory. For instance, when the transmit-side forwarding node is a software forwarding element executing on a computer, the service queues are storage locations in the computer's memory in some embodiments or queues of a network interface controller (NIC) of the computer in other embodiments. While the example presented in FIG. 1 illustrates service queues on the transmit-side forwarding node, other embodiments do not employ service queues on the transmit-side of a WAN link, but only employ service queues on the receive-side of the WAN link in order to enforce the QoS metrics for a service class.

In the example illustrated in FIG. 1, a packet is processed by one or more packet-processing stages or operations of an egress pipeline once the packet exits its service queue. When the transmit-side forwarding node includes a forwarding ASIC, the packet in some embodiments is processed by the egress pipeline associated with the port from which the packet is supposed to exit the forwarding ASIC. This port is associated with a port of the forwarding element that includes the forwarding ASIC. When the transmit-side forwarding node is a software forwarding element executing on a computer, the packet is processed by one or more modules or circuits of the computer in order to have the packet exit the computer's NIC.

In some embodiments, the egress-side processing of the transmitting forwarding node does not entail many operations other than the operations needed to direct the packet to the port or NIC for egressing the node. Alternatively, in some embodiments, one or more of the ingress-side operations (such as SCMM generator) are implemented by the egress processing pipelines of the transmitting forwarding node.

In the example illustrated in FIG. 1, the two forwarding nodes 102 and 104 are connected through the QoS aware link 190 (e.g., an MPLS link, etc.). This QoS aware link has multiple associated service classes. This link serves as one layer 1 physical connection (one L1 physical network connection circuit) for one or both forwarding nodes. In some embodiments, one of the forwarding nodes can connect to this link through other network links, but one of the forwarding nodes connects directly to this link. Also, in some embodiments, one or more IP addresses can be associated with this link 190.

The receive-side components 114 of the forwarding node 104 receives a packet sent by the forwarding node 102 along a particular service class. Like the transmit-side components 112, the receive-side components include one or more ingress processing pipelines 142, one or more egress processing pipelines 144, several service-class queues 146 in between the ingress and egress processing pipelines, and schedulers 148 for the SC queues. Again, when the forwarding node 104 is implemented with a hardware ASIC, its processing pipelines include one or more stages of match-action units, as described above. Alternatively, when the forwarding node is a software forwarding node, the processing pipelines are implemented fully or partially by match-action operations performed by one or more software forwarding elements (e.g., switches, routers, etc.).

An ingress processing pipeline 142 processes a packet received by the forwarding node 104, identifies the service class associated with this packet (e.g., from a service class identifier that is inserted in the received packet's header), and specifies a service queue 146 for the identified service class to store the received packet. Packets are read out of the service queues 146 based on egress rates specified by the schedulers 148 for these queues. In some embodiments, each service class' scheduler 148 specifies a rate that is commensurate with the QoS metrics associated with the service class. The duration that a packet stays in the service queue for its service class depends not only on the egress rate specified by the queue's scheduler but also based on the queue's congestion (i.e., the number of earlier packets in the queue).

When the receive-side forwarding node includes a forwarding ASIC, the service queues in some embodiments are part of a cross bar switching fabric between the different ingress and egress pipelines. Alternatively, when the receive-side forwarding node is a software forwarding element executing on a computer, the service queues are storage locations in the computer's memory in some embodiments.

When the packet exits its service queue 146, the packet is processed by one or more packet-processing stages or operations of an egress pipeline 144. As shown in FIG. 1, the egress packet processing pipeline 144 on the receive-side components 114 in some embodiments implement a PQM calculator 154 and an SCMM tracker 156. The illustration in FIG. 1 offers just one example of an implementation of the transmit- and receive-side components of a forwarding node in an SD-WAN of some embodiments. In other embodiments, these components 154 and 156 can be implemented differently, e.g., the SC message monitor 156 in some embodiments is implemented in the ingress processing pipeline 142.

The PQM calculator 154 calculates PQM values that quantify the quality of two or more service classes provided by the link 190 between the forwarding nodes 102 and 104. The PQM calculator 154 stores the calculated PQM values in metric storage 155. In some embodiments, the computed PQM value for each service class quantifies the QoS provided to packets processed through the service class (e.g., through the service queues of the service class). In some embodiments, the PQM calculator 154 adjusts the PQM values as it processes more packets associated with the service classes. The PQM calculator 154 also periodically forwards to the forwarding node 102 the PQM values that it maintains for the service classes.

In some embodiments, the forwarding node 102 performs a similar set of operations to compute PQM values for packets sent by the forwarding node 104 for the different service classes, and to provide these PQM values to the forwarding node 104 periodically. As further described below, each forwarding node uses the PQM values received by the other forwarding node to assess the quality of the service classes of the link 190 for forwarding data messages to the other forwarding node.

The PQM calculator 154 compute different PQM values in different embodiments. For instance, for each service class, the PQM calculator in some embodiments computes packet loss, delay and jitter as three PQM values for the service class. To compute PQM values for each service class, a PQM calculator uses the sequence numbers associated with the packets to differentiate the service classes associated with the packets. For example, to compute packet loss for a service class, the PQM calculator in some embodiments uses the sequence numbers of the service classes to maintain counts of packets that are not received timely and sequentially, and uses the time average of this count as the average packet loss for the service class.

To compute the packet delay for the service class, the PQM calculator 154 in some embodiments computes (1) a delay value for each packet by computing a difference between a time stamp contained in the packet's header and the time the forwarding node 104 received the packet, or a difference between a time stamp contained in the packet's header and the time the packet was read out of its service queue 146 and supplied to the egress pipeline 144, and (2) averages this delay with other delay values it computed for packets associated with the same service class. Again, the PQM calculator 154 identifies the packets associated with the same service class based on the packet sequence numbers that are associated with the service class. The PQM calculator 154 in some embodiments computes the packet jitter as a derivative of the packet delay values that it computes (i.e., based on the rate of change of the delay value).

In some embodiments, the PQM calculator 154 identifies a state value (e.g., an operational value, a degraded value, or a failed value) for each service class based on the PQM values that it computes for the service class, and stores these values in state storage 157. It identifies these state values using one or more of the techniques that were described above for the PQM monitor 134 maintaining these values. In some embodiments, the PQM calculator 154 periodically provides the state values that maintains for the service classes to the PQM monitor 134, while in other embodiments, it provides these state values to the monitor 134 each time there is a change of state to one of the service classes.

The SCMM tracker 156 also maintains statistics in a stat storage 159 and states in a state storage 161 regarding the health of a service class. In addition to the set of SC state values generated by the PQM calculator 154, the SCMM tracker 156 generates another set of SC state values for each service class for which the SC message monitor 136 sends SC monitoring messages. This tracker's set of state values are based on loss values that the tracker maintains in its state storage 161 for SC monitoring messages that it processes for each service class. As mentioned above, it tracks each service class' SC monitoring messages based on the service identifier associated with these messages. In some embodiments, the SCMM tracker 156 periodically checks to make sure that it has received a SC monitoring message from the SCMM generator 136 once every configurable time period. If it detects that it has not received an SC monitoring message for N (e.g., 3) consecutive time periods for a service class, it changes the state of service class to degraded, and then changes the state to failed when it detects that it has not received an SC monitoring message for M (e.g., 7) consecutive time periods for the service class.

When a first forwarding node informs a second forwarding node that a service class has degraded or has failed (e.g., as determined by the first forwarding node's PQM calculations or SCMM tracking), the second forwarding node reduces or eliminates its use of the service class. Also, in such a case, one or both of the forwarding nodes generates a notification (e.g., sends one or more notification packets) to another forwarding node, a server, or a controller to provide notification of the degradation or failure of a service class.

When it is desirable to reduce the amount of monitoring messages in the WAN, some embodiments use SC monitoring messages only for a subset of the service classes of a network link, while assessing quality of one or more other service classes of the network link by using the PQM values maintained at the second forwarding node for the other service classes. The subset of service classes in some embodiments are the critical service classes that are used to forward packets of critical application.

Some embodiments use both SC monitoring messages and PQM values to assess the state of a service class because the two different mechanisms have different strengths and weaknesses. The SC monitoring messages offer a fast way of detecting the degradation or failure of a service class. However, the SC monitoring messages in some cases might not detect all undesirable performance characteristics of a service class. For such situations, the PQM values are useful in detecting the service class degradation or failure.

FIG. 2 illustrates a process 200 that the transmit-side components of a forwarding node perform in some embodiments to associate a packet that it receives with a service class. As shown, the process 200 starts (at 205) when it receives a packet to forward along a network link that connects its forwarding node to another forwarding node in the WAN. The received packet is a first packet of a flow. Next, at 210, the process 200 identifies the service class for the packet. The identified service class has an associated service class identifier that uniquely identifies the service class. In some SD-WAN embodiments that use MPLS, the service class identifier is the DSCP (differentiated service code point) tag associated with the service class. In other embodiments that use MPLS, the service class identifiers are not the DSCP tags.

In some embodiment, the process identifies the packet's service class through service class identifier that is contained in a header of the packet, or otherwise specified for the packet, by another element in the network. Alternatively, in some embodiments, the process 200 performs (at 210) a classification operation that matches the packet header values with a service classification rule that provides the service class identifier for the packet. For instance, in some embodiments, the classification operation matches the received packet's header values with the match identifier of a match-action rule. This rule has a corresponding action identifier that provides the identifier of the service class that should be associated with any packet that matches its corresponding match identifier. In some embodiments, different match-action rules include (1) match identifiers that have header values associated with different priority applications (e.g., IP addresses or port addresses of high priority applications), and (2) action identifiers that provide identifiers of different priority service classes to use for the different priority applications.

After identifying a service class for a packet, the process 200 identifies (at 215) a sequence number from a range of sequence numbers used for the identified service class. As mentioned above, the SC processor 132 in some embodiments uses different sequence number counters 131 to obtain different sequence numbers for packets of different service classes. In some embodiments, these counters produce counts in different ranges for the different service classes so that the different service classes can use different sequence numbers. In other embodiments, these counters produce counts in the same range, but different counts are generated for the different service classes. Moreover, in these embodiments, the generated count produced for each service class is combined with the service class identifier, or a unique number derived from the service class identifier, to specify a larger sequence number for the packet, in order to ensure that no two sequence numbers for two different service classes ever match.

Under either of the above-mentioned approaches, the process 200 selects the sequence number that the number counter for the identified service class has as the current sequence number for this class. The counter then increments this number for the next packet that it needs to process. In other embodiments, the service class' counter first increments the sequence number and then provides the incremented sequence number each time the SC processor 132 requests a sequence number for a packet that the SC processor is processing.

Next, at 220, the process 200 associates the packet with the identifier of the service class identified at 210 and the sequence number identified at 215. In some embodiments (e.g., those that perform classification operations to identify the service class for a packet), the process 200 creates (at 225) a record in a connection tracking table that specifies the service class identifier (obtained at 210) for the received packet's flow, so that this record can be used to quickly identify the service class for subsequent packets in the same flow. This record in some embodiments includes the flow's identifier (e.g., five tuple identifier) as its match attribute, and specifies the service class identifier in its action attribute.

At 230, the process 200 continues its processing and forwarding of the packet by using the service class identifier obtained at 210 and the sequence number identified at 215. For instance, during the packet processing in the ingress and/or egress pipelines, some embodiments tag the packet with the service class identifier and the sequence number. In some embodiments, the packet is also placed in the identified service class' service queue of the transmit-side forwarding element, and read out of this queue based on this queue's congestion and egress rate (which is determined by the QoS that the service class is configured to receive). When the packet is transmitted to the other forwarding node, its associated service class identifier and sequence number are inserted in the header (e.g., an overlay network header, an encapsulating header or an MPLS header) of the packet. After 230, the process 200 ends.

FIG. 3 illustrates a process 300 that the receive-side components of a forwarding node perform in order to process a packet that is received for a service class of a QoS aware link. The process 300 starts when the packet is read out (at 305) of a service queue of the service class. Based on the configured QoS setting, a scheduler 148 for the service class in some embodiments determines the rate for packets to leave this service queue. This rate along with the congestion of the service queue will determine how fast a packet traverses through this queue.

Once the packet leaves its service queue, the PQM calculator 154 calculates PQM values that quantify the quality of service that this packet actually has received for its service class and link. In some embodiments, the PQM calculator 154 adjusts the PQM values as it processes more packets associated with the service classes. To compute PQM values for each service class, the PQM calculator uses the sequence numbers associated with the packets to differentiate the service classes associated with the packets.

The operations 310-330 illustrate one example of the computations that the PQM calculator 154 performs in some embodiments to compute the PQM values. To compute the packet's delay, the process 300 in some embodiments computes (at 310) a delay value for each packet by computing a difference between a time stamp contained in the packet's header and the time the forwarding node 104 received the packet, or a difference between a time stamp contained in the packet's header and the time the packet was read out of its service queue 146 and supplied to the egress pipeline 144.

The process 300 then uses this delay value to update the delay value that it stores for the packet's service class in the stat storage 155. In some embodiments, the process averages this delay with other delay values it computed for packets associated with the same service class. This average is a weighted average that is biased towards more recent measurements in some embodiments, while it is unweighted simple average in other embodiments. In some embodiments, the process maintains an average value and current packet count in the storage 155 so that it can produce an unweighted average by multiplying the average value with the current packet count, adding the value of the delay computed at 310 to this sum, and then dividing the sum by the current packet count plus one. In storing the new average in the stat storage 155 in these embodiments, the process increments the current packet count by one.

After computing and updating the delay values, the process 300 in some embodiments computes (at 315) the packet jitter as a derivative of the packet delay values that it has computed for the service class. This derivative is computed based on the rate of change of the computed delay values. In other embodiments, the jitter values are computed as a separate process that is performed periodically on delay values that the PQM calculator produces during different periods. In some embodiments, the process 300 updates the jitter value by maintaining several previously computed delay values and the current jitter value in the stat storage 155, while in other embodiments it updates the jitter value just from the current jitter value that it stores in the stat storage 155.

Next, at 320, the process determines whether the received packet has a sequence number that follows the previous sequence number of the previous packet that was processed for the service class. If not, the process 300 (at 330) requests the transmitting forwarding node to resend the packet, and then increments a packet loss value that it maintains for the service class in the stat storage 155. The process then updates (at 330) in this storage 155 the average packet loss value that it maintains for the service class based on the incremented packet loss value. After 330, the process transitions to 335.

When the process determines (at 320) that the received packet has a sequence number that follows the previous sequence number of the previous packet that was processed for the service class, the process transitions to 325, where it resets the packet loss count and updates the average packet loss value in the stat storage 155. From 325, the process transitions to 335. At 335, the process determines whether there is another packet in the service queue of the service class that is ready to be processed. If not, the process remains at 335, until the next packet is ready for processing, at which point the process returns to 305 and repeat its operations for this new packet.

FIG. 4 illustrates a process 400 that the PQM calculator 154 of the receive-side components of a WAN forwarding node of some embodiment performs repeatedly. The PQM calculator 154 performs the process 400 to periodically report to another WAN node the PQM values that it computes for each service class of each QoS aware link connecting its WAN node to the other WAN node. As shown, the process 400 starts by retrieving (at 405) the PQM values for each service class of each QoS aware links with another WAN forwarding node.

The retrieved PQM values in some embodiments are the values that the PQM calculator computes, stores and updates as it processes packets for the different service classes from the other WAN forwarding node (e.g., the PQM values that it computes in performing part of the process 300 of FIG. 3). In some embodiments, these PQM values include packet loss, delay and jitter values that are currently stored in the stat storage 155 for each service class of each QoS aware link that connects the PQM calculator's WAN node to the other WAN node.

Next, at 410, the process 400 forwards the retrieved PQM values to the other forwarding node. The PQM monitor 134 in the transmit-side components of the other forwarding node then store and analyze these values to derive one set of state values for each service class. In addition to deriving the state values, the PQM values are used by the other forwarding node in some embodiments to select links and/or service classes for packets and/or flows that it processes, as further described below.

At 415, the process 400 resets a timer that it uses to measure periods that it has to wait before reporting PQM values. After resetting this timer, the process waits (at 420) until the timer expires, at which point it returns to 405 to repeat its operations to report the next batch of PQM values for each service class of each QoS aware link connecting its WAN node to the other WAN node. The process 400 continuously performs these operations to continuously report PQM values to the other WAN node, while there is at least one operation QoS aware link connecting its WAN node to the other WAN node.

FIG. 5 illustrates a process 500 that specifies state values for service classes of a QoS aware link between two WAN forwarding nodes. In some embodiments, the PQM monitor 134 of the transmit-side components of one forwarding node periodically performs this process based on PQM values reported by the PQM calculator 154 of the receive-side components of the other forwarding node. In other embodiments, the PQM calculator 154 of the receive-side components of a forwarding node periodically performs the process 500 and forwards the states that it computes to the other forwarding node.

In some embodiments, the service usability state values that the process 500 specifies include an operational state signifying that the service class is operational, a degraded state signifying that the service class is congested or for some other reason is not providing the desirable service level, and a failed state signifying that the service class is not operational and should not be used.

As shown, the process 500 starts by retrieving (at 505) a current set of PQM values for each service class of the QoS aware link with another WAN forwarding node. These PQM values in some embodiments are stored in transmit-side stat storage 135 or receive-side stat storage 155 depending on whether the PQM monitor 134 or the PQM calculator 154 is performing the process 500. The retrieved PQM values include packet lost, delay and jitter values that are currently stored in the stat storage 135 or 155 for each service class of the QoS aware link.

The process next selects (at 510) one of the service classes. To generate the usability state value for each service class, the process 500 in some embodiments compares one or more PQM values for the service class with one or more threshold values that are specified (e.g., by a network administrator) for the service class, and designates the service class as degraded or failed when the PQM values do not meet their respective threshold values (e.g., are not below their threshold values). In some embodiments, a PQM value type has one threshold for marking the service class as degraded and another threshold for marking the service class as failed. Some embodiments compute a blended score (e.g., a weighted sum) from two or more PQM values for a service class, and compare this blended score with two threshold values to determine whether the service class should be designated as failed or degraded.

Accordingly, the process compares (at 515) the set of retrieved PQM values for the selected service class with a first set of threshold values to determine whether the service class is operational. In some embodiments, the first set of threshold values includes a first threshold loss value, a first threshold delay value and a first threshold jitter value, and the selected service class' retrieved loss, delay and jitter values have to be less than their corresponding first threshold values for the process to deem the service class operational. In other embodiments, the process 500 computes a blended score (e.g., a weighted sum) from the packet loss, delay and jitter values for the selected service class, and compares this blended score with a first operational threshold value to determine whether it should designate service class as operational (e.g., the blended score is less than the first operational threshold).

When the process determines (at 515) that the service class is operational based on its comparison, it transitions to 520 to define the state of this service class as operational, and then transitions to 545, which will be described further below. On the other hand, when the process determines (at 515) that the retrieved PQM values do not meet the operational state threshold value(s), the process determines (at 525) whether the set of retrieved PQM values for the selected service class meet with degraded state threshold value(s).

To do this, the process compares (at 525) the set of retrieved PQM values for the selected service class with a second set of threshold values to determine whether the service class is operating in a degraded state. In some embodiments, the second set of threshold values includes a second threshold loss value, a second threshold delay value and a second threshold jitter value, and the selected service class' retrieved loss, delay and jitter values have to be less than their corresponding second threshold values for the process to deem the service class degraded. In other embodiments, the process 500 computes a blended score (e.g., a weighted sum) from the packet loss, delay and jitter values for the selected service class, and compares this blended score with a second operational threshold value to determine whether it should designate service class as degraded (e.g., the blended score is less than the second operational threshold).

When the process determines (at 525) that the service class is degraded based on its comparison, it transitions to 530 to define the state of this service class as degraded, and then transitions to 545. On the other hand, when the process determines (at 525) that the retrieved PQM values do not meet the degraded state threshold value(s), the process defines (at 540) the state of this service class to failed, and then transitions to 545. At 545, the process determines whether it has examined all the service classes for the link between the two forwarding nodes. If so, it ends. Otherwise, it returns to 510 to select another service class for the link.

When a service class is designated as failed, the packet-transmitting forwarding node in some embodiments does not use the service class and generates an alert (e.g., a notification email, text, or other report) to network administrator that the network connection for the service class should be examined. When the service class is designated as degraded, the forwarding node in some embodiments does not use the service class in some embodiments, while in other embodiments the forwarding node uses this service class for fewer packets that it transmits through the network link.

Also, when the service class is degraded, the forwarding node in some embodiments generates an alert (e.g., a notification email, text, or other report) to network administrator that the network connection for the service class should be examined. However, irrespective of whether one service class is designated as failed or degraded, some embodiments continue using one or more other operational service classes that are associated with the network link (i.e., one or more service classes that have an operational state). This is because the maintenance of operational states for all the service classes of a QoS aware network link, allows one or more service classes of a network link to remain fully operational even through one or more service classes are designated as failed or degraded.

In addition to using service class PQM values to compute one set of state values for each service class of a QoS aware network link, some embodiments use service-class (SC) monitoring messages to compute another set of state values for each service class of the QoS aware network link. Some embodiments use both SC monitoring messages and PQM values to assess the state of a service class because the two different mechanisms have different strengths and weaknesses. The SC monitoring messages offer a fast way of detecting the degradation or failure of a service class, but do not catch all degradation and failed conditions.

FIG. 6 illustrates a process 600 that the SCMM generator 136 of the transmit-side forwarding node component 112 performs to periodically generate SC monitoring message for each service class. As shown, the process initially selects (at 605) one of the service classes. Next, at 610, it generates a SC monitoring message (e.g., a liveness or heartbeat ICMP pinging message) for the selected service class. The SC monitoring message in some embodiments is associated with the selected service class as it includes the identifier of the service class. The process sends (at 610) the generated SC monitoring message to the receive-side components 114 of the other forwarding link connected to the link 190.

At 615, the process 600 determines whether it has sent SC monitoring messages for each service class of the QoS aware link for which it has to send out SC monitoring messages. The process 600 sends SC monitoring messages for all the service classes of the link in some embodiments, while in other embodiments the process 600 sends SC monitoring messages for a subset of service classes (e.g. the critical service classes that are used to forward packets of critical application). As mentioned above, some embodiments reduce the amount of monitoring messages in the WAN, by using SC monitoring messages for only a subset of the service classes of a network link. These embodiments assess the quality of one or more other service classes of the network link by using just the PQM values generates for these services classes.

When the process determines (at 615) that it has not sent SC monitoring messages for each applicable service class, the process returns to 605 to select another service class and to generate and send (at 610) an SC monitoring message for this service class. When the process determines that it has sent SC monitoring messages for all the desired service classes, the process resets (at 620) a timer that it uses to send out SC monitoring messages.

After resetting this timer, the process waits (at 625) until the timer expires, at which point it returns to 605 to repeat its operations to send out the next batch of SC monitoring messages to the other forwarding node. The process 600 continuously performs these operations to continuously send SC monitoring messages to the other WAN node. In some embodiments, the process sends SC monitoring messages for the different service classes at different rates (e.g., based on different timers), or at the same rate but at different times so that the receiving forwarding node does not have to handle multiple SC monitoring messages for multiple service classes at one time.

FIG. 7 illustrates a process 700 that the SCMM tracker 156 of the receive-side components 114 of a forward node performs in some embodiments to process SC monitoring messages for a service class of a QoS aware link for which the SC message generator 136 sends monitoring messages. In some embodiments, the SCMM tracker 156 maintains statistics and states regarding the health of each service class for which the SC message generator 136 sends monitoring messages. This tracker generates state values for each such service class based on loss values that it tracks for SC monitoring messages that it processes for the service class.

As shown, the process 700 initially sets (at 705) a timer (e.g., a 300 ms timer) for receiving a SC monitoring message for the service class. Next, at 710, the process determines whether it received the SC monitoring message for the service class before the timer expired. As mentioned above, the SCMM tracker 156 identifies each service class' SC monitoring messages based on the service identifier accompanying these messages (e.g., the service identifier stored in the overlay network or the encapsulating header of these messages).

When the timer expires (at 710) before the process receives the next SC monitoring message for the service class, the process 700 increments (at 720) a lost-SCMM count that it maintains for the service class in its stat storage 159. Next, at 725, the process determines whether the lost-SCMM count exceeds a higher, first threshold (e.g., 7). If so, the process marks (at 730) the service class as unusable, generates a message to the other forwarding node to identify this unusable state, generates another message to a controller or server to provide notification of the failed state of the service class, and then ends.

On the other hand, when the process determines (at 725) that the lost-SCMM count does not exceed the higher, first threshold, it determines (at 735) whether the lost-SCMM count exceeds a lower, second threshold (e.g., 3). If so, the process marks (at 745) the service class as unstable (i.e., degraded), generates a message to the other forwarding node to identify this unstable state, generates another message to a controller or server to provide notification of the degraded state of the service class, and then transitions to 740, which will be described below.

When the process determines (at 735) that the lost-SCMM count does not exceed the lower, second threshold, it transitions to 740. At 740, the process resets the timer for detecting the next SC monitoring message for the service class, and then returns to 710 to wait for the next SC monitoring message or the expiration of the timer. The process 700 also resets (at 715) the timer when the process receives (at 710) the next SC monitoring message for the service class before the timer expires. At 715, the process resets the lost-SCMM count that it maintains for the service class in its stat storage 159. Also, if the SCMM tracker generated state for the service class is currently degraded (i.e., unstable), the process resets (at 715) this state of the service class to operational.

As mentioned above, when a first forwarding node informs a second forwarding node that a service class has degraded or has failed (e.g., as determined by the first forwarding node's PQM calculations or SCMM tracking), the second forwarding node reduces or eliminates its use of the service class. Also, in such a case, one or both of the forwarding nodes generates a notification (e.g., sends one or more notification packets) to another forwarding node, a server, or a controller to provide notification of the degradation or failure of a service class.

In addition to maintaining usability states for the service classes, some embodiments perform other operations based on the PQM values computed for the different service classes. FIG. 8 illustrates a process 800 that a forwarding node uses to distribute egress traffic to another forwarding node through two or more different network links that serve as alternative paths to the other forwarding node. For a packet or flow associated with a service class, the process uses the PQM values of that service class along two or more links as well as the PQM value of non-QoS aware link, to select the link for the packet or flow.

This process will be explained by reference to FIG. 9, which illustrates an edge WAN forwarding node 902 forwarding packet flows to another edge WAN forwarding node 904 through one of three different paths 906, 908, and 910 between them. The edge forwarding nodes 902 and 904 in this example are at two different branch offices 950 and 952 of an enterprise. Each branch office 950 or 952 has its own local area network (LAN) that connects the devices (e.g., computers, etc.) at the branch office. Through the forwarding nodes 902 and 904, a WAN is formed to connect the branch office LANs. This WAN is an overlay SD-WAN that is established by using overlay network headers for the packets processed by the WAN. The forwarding nodes 902 and 904 in some embodiments use encapsulating tunnel headers to allow the packet's overlay network headers to be transparent to the underlay network fabric that the packets traverse.

Two of three paths 906 and 908 between the edge nodes 902 and 904 are provided by two QoS aware links that connect the forwarding node 902 to two sets of transit MPLS nodes 912 and 914 of an MPLS network 965. The two sets of transit MPLS nodes 912 and 914 may or may not use an overlapping set of MPLS circuits. The third path 910 uses a non-QoS aware broadband network link of the forwarding node 902 (e.g., such as a broadband cable modem connection) to connect this forwarding node to the forwarding node 904. This path 910 is established by not only transit broadband forwarding nodes (not shown) but also by a gateway 916 in a public cloud datacenter 960.

As shown in FIG. 8, the process 800 receives (at 805) a packet to forward to the other WAN forwarding node, called the destination forwarding node. This packet is associated with a service class based on a service class identifier that accompanies the packet, or based on a classification operation that associates the packet to the service class (e.g., a classification operation that matches the packet's header values with an identifier of a classification rule that provides the service class for the packet).

The forwarding node that executes the process 800 connects to the destination forwarding through multiple paths facilitated by multiple network links, at least two of which are QoS aware links that offer the service class associated with the packet. FIG. 9 illustrates an example of three paths 906, 908, and 910 between forwarding node 902 and 904, with two paths 906 and 908 using two QoS aware links of the forwarding node 902 that connect to two MPLS circuits 912 and 914 and the third path 910 using a non-QoS aware link and the gateway 916.

At 810, the process retrieves the PQM values for the received packet's associated service class along each QoS aware link connecting the forwarding node of the process 800 to the destination forwarding node. The process 800 also retrieves (at 810) the PQM value(s) of any non-QoS aware link connecting the forwarding node of the process 800 to the destination forwarding node.

Let's assume that a received packet at the forwarding node 902 in FIG. 9 is associated with service class 2. Hence, at 810, the forwarding node 902 identifies the set of PQM values associated with the service class 2 along each of the two QoS aware links that uses paths 906 and 908 and MPLS circuits 912 and 914, as well as the set of PQM values associated with non-QoS aware broadband link that uses the path 910 and the gateway 916. The non-QoS aware link has one set of PQM values as it does not have different service classes for which the PQM value sets can be individually computed.

Next, the process 800 selects (at 815) one of the network links for the packet, and then forwards (at 820) the packet along the service class of the selected network link so that it can reach the destination forwarding node. To forward the packet along the service class of the selected network link, the process associates (at 820) the packet with the sequence number for the service class of the selected network link.

To select the network link for the packet at 815, the process 800 in some embodiments determines which of the PQM value sets identified at 810 has the best PQM value(s) for the received packet. In some embodiments, the process 800 computes (at 815) a weighted sum for each identified PQM value set, and then selects the PQM value set that has the best weighted sum (e.g., the smallest weighted sum). For instance, in the above-mentioned example illustrated in FIG. 9, the forwarding node 902 computes a weighted sum for each of retrieved PQM value sets associated with service class 2 along each of the QoS aware links that uses the paths 906 and 908 and the MPLS circuits 912 and 914, and a weighted sum for the retrieved PQM value set of the non-QoS aware link that uses the path 910 and the gateway 916. It then selects one of the links that use the paths 906, 908 or 910 that has the best weighted sum.

Other embodiments select the network link differently at 815. For instance, different types of PQM values are important for different packet flows. Hence, in some embodiments, the process 800 selects a network link for the packet by selecting the PQM value type that is most important to the packet's flow, and then using this type's PQM values of the particular class to select the network link with the “best” PQM value.

For example, the forwarding node 902 can determine that the packet is part of a VOIP (voice over IP) message flow that cannot tolerate delay. In some embodiments, the node 902 makes this determination based on deep packet inspection, while in other embodiments it makes this determination based on classification rules that associate different IP and port addresses with different type of applications. After determining that the packet is part of a VOIP packet flow, the forwarding node 902 identifies the delay value in the three sets of PQM values for the three links that use the paths 906, 908 and 910, and then select the link that has the smallest delay value.

Some embodiments perform the packet distribution among the network links on a per packet basis, while other embodiments perform this packet distribution on a per flow basis. Hence, for the embodiments that perform this distribution on a per flow basis, the process 800 creates (at 825) a record in a connection tracking storage that associates the flow identifier of the packet (received at 805) with the link that was selected for this packet at 815, and then ends. The process 800 does not perform the operation at 825 in the embodiments where it has to re-assess the link to use for each packet of a flow.

The process 800 of FIG. 8 is performed by the ingress pipeline 122 of a forwarding node. In some embodiments, the ingress pipeline (1) identifies multiple available links that provided multiple different paths to the destination IP address of the packet, (2) identifies the PQM values for these links for the service class associated with the packet, and then (3) selects the link based on these PQM values. In other embodiments, the ingress pipeline (1) identifies an egress WAN edge node or a next hop WAN node from the destination IP address of packet, (2) identifies multiple different to this egress or next hop node, (3) identifies the PQM values for these links for the service class associated with the packet, and then (4) selects the link based on these PQM values.

Instead of just picking the network link that offers the best PQM value or set of PQM values for a received packet associated with a particular service class, some embodiments perform a load balancing operation to distribute the load across two or more network links that offer the particular service class. This load balancing operation in some embodiments relies on load balancing criteria that are computed based on the PQM values that are computed for the particular service class for the two or more service classes.

The load balancing criteria in some embodiments are weight values that are computed based on the PQM values. In some embodiments, the weight values are also computed based on the depth of queues used to temporarily store packets before they are transmitted by the schedulers of the forwarding nodes. The load balancing operation in some embodiments can be performed on a per-flow basis or per-packet basis. When performed on a per-packet basis, the packets of one flow can be split in two or more streams that are sent along two or more network links that offer the desired service class for the packet. This increases the egress rate of the forwarding node for the flow as it allows the flow's packets to use the available throughput of multiple network links that offer the QoS for the particular service class.

FIG. 10 illustrates an example of transmit-side components of a forwarding node that perform this load balancing operation. These components include a weight calculator 1005 and a load-balancing link selector 1010. FIGS. 11 and 12 illustrates processes 1100 and 1200 that these components perform in some embodiments. The weight calculator 1005 performs the process 1100 on a periodic basis. From a PQM storage 1030, the weight calculator retrieves (at 1105) a set of PQM values for each service class of each QoS aware link between two WAN nodes.

At 1110, the weight calculator also obtains queue depth values from queue depth storage 1035. The queue depths define the current queue depths or average queue depths of the service queues for each service class. In some embodiments, the schedulers of the service classes maintain such queue depth values and the weight calculator 1005 obtains the queue depth values from the schedulers. At 1115, the weight calculator 1005 then computes for each service class two or more weight values associated with two or more QoS aware links connecting the forwarding node of the process 1100 to another WAN forwarding node (the destination forwarding node). This computation in some embodiments is a normalized weighted sum of the PQM and queue depth values that produces two or more fractional weight values that collectively sum up to 1.

The generated weight values then represent the desired load balanced distribution of a flow's packets across the two or more links to the destination forwarding node. In the example illustrated in FIG. 10, the weight calculator 1005 computes two weight values for each service class in the set of service classes offered by the two QoS aware links 1020 and 1025 (e.g., two MPLS links) that connect the weight calculator's forwarding node to another WAN forwarding node. The computed weight values are stored in the weight value storage 1015 of FIG. 10.

For each packet flow that is associated with a service class, the load balancer 1010 then uses the two weight values for that service class to distribute the packets of the flow among the two links 1020 and 1025. FIG. 12 illustrates a process 1200 performed by the load balancer 1010 in some embodiments. As shown, the process starts (at 1205) when the load balancer receives a packet to forward along a service class to another WAN node that connects to the load balancer's WAN node through multiple links that offer the service class. Next, at 1210, the weight values computed for the service class along the two or more links to the other WAN node are identified. The load balancer then performs (at 1215) a load balancing operation to select one of the links for the received packet. The load balancer then provides the packet with the selected link to forwarding modules or circuits 1040 of the forwarding node so that the packet can be forwarded (at 1220) to the other WAN forwarding node along the service class of the selected link.

For instance, in some embodiments, the load balancer performs a round robin selection of one of two links based on the weight values. Let's assume one of the weight values is 0.4, while the other weight value is 0.6. The round robin selection of the load balancer of some embodiments then directs the first four packets of a flow along the service class of the first link, the next six packet of the flow along the service class of the second link, the next four packets of the flow along the service class of the first link, the next six packets of the flow along the service class of the second link, and so on.

Instead of using static service class assignments based on classification rules or service class identifications in packet headers, some embodiments dynamically select a service class for a packet by analyzing the PQM values computed for the service classes and selecting the service class that offers the best PQM value(s) at the time that the packet is being processed by the forwarding node.

FIG. 13 illustrates a process that dynamically selects the service class for a packet or flow. The forwarding node that executes the process 1300 connects to another WAN forwarding node through multiple paths facilitated by multiple network links, at least two of which are QoS aware links that offer several service classes. The process 1300 starts (at 1305) when the forwarding node receives a packet to forward to the other WAN forwarding node, called the destination forwarding node. For instance, in the example illustrated in FIG. 9, the forwarding node 902 would receive a packet to forward to the forwarding node 904, along one of the two QoS aware links that use the paths 906 and 908 and circuits 912 and 914, or the third non-QoS aware link that uses the path 910 and the gateway 916. The received packet is not associated with a service class, or if it is, the process 1300 ignores this association.

At 1310, the process retrieves the PQM values for all the service classes of each link that offers a path to the destination node from the forwarding node of the process 1300. In the example of FIG. 9, the retrieved PQM values would be PQM values of all the service classes of the two QoS aware links that use the paths 906 and 908 and circuits 912 and 914 and the PQM values for the third non-QoS aware link that uses the path 910 and the gateway 916.

Next, at 1315, the process 1300 selects for the packet the link that has the best retrieved PQM value or PQM value set. The selected link in some embodiments can be the non-QoS aware link best retrieved PQM value or PQM value set, or it can be a QoS aware link that has a service class with the best retrieved PQM value or PQM value set. To select the network link for the packet at 1315, the process 1300 use different techniques in different embodiments to identify which of the PQM value sets identified at 1310 has the best PQM value(s) for the received packet.

In some embodiments, the process 1300 computes (at 1315) a weighted sum for each identified PQM value set, and then selects the PQM value set that has the best weighted sum (e.g., the smallest weighted sum). For instance, in the example illustrated in FIG. 9, the forwarding node 902 computes a weighted sum for each of retrieved PQM value sets associated with each service class of each QoS aware link that uses the path 906/908 and circuit 912/914, and a weighted sum for the retrieved PQM value set of the non-QoS aware link that uses the path 910 and the gateway 916. It then selects the link that has the best weighted sum. When the selected link is one of the QoS aware links, the forwarding node 902 selects the link's service class for the received packet that provided the best weighted sum.

Other embodiments select the network link differently at 1315. For instance, different types of PQM values are important for different packet flows. Hence, in some embodiments, the process 1300 selects a network link for the packet by selecting the PQM value type that is most important to the packet's flow, and then using this type's PQM values to select the network link with the “best” PQM value.

For example, the forwarding node 902 can determine that the packet is part of a VOIP (voice over IP) message flow that cannot tolerate delay. Hence, the forwarding node 902 identifies the delay value in the three sets of PQM values for the three links that use the paths 906 908, and 910, and then select the link that has the smallest delay value. When the selected link is one of the QoS aware links, the forwarding node 902 selects the link's service class for the received packet that provided the best delay.

When the selected link is a QoS aware link, the process associates (at 1320) the packet with the selected service class of the selected link, and forwards (at 1330) the packet with the associated selected service class to the other forwarding node along the selected network link. To associate the packet with the selected service class, the process in some embodiments associates the packet with the identifier of the selected service class (e.g., its DSCP tag) and the next sequence number for the selected service class. When the selected link is a non-QoS aware link, the process 1300 associates (at 1325) the packet with the next sequence number for the selected non-QoS link, and forwards (at 1330) the packet to the other forwarding node along the selected non-QoS link.

Some embodiments perform the link selection process 1300 on a per packet basis, while other embodiments perform this link selection process 1300 on a per flow basis. For the embodiments that perform this selection on a per flow basis, the process 1300 creates (at 1335) a record in a connection tracking storage that associates the flow identifier of the packet (received at 1305) with the link that was selected for this packet at 1315, and then ends. The process 1300 does not perform the operation at 1335 in the embodiments where it has to re-assess the link selection for each packet of a flow.

The dynamic selection and association of a service class for a packet allows packets of a critical application to always use service classes that provide the best PQM values at any given time. In some embodiments, the dynamic selection of the service class can be based on the type of PQM value that is most important to the critical application. For instance, only a minimal level of jitter might be acceptable for a particular application. Hence, for this application, the method of some embodiments uses the computed jitter values of the service classes of a network link to select one service class for the packets of the particular application. In this manner, the dynamic selection of the service classes can itself be a function of the application type. Instead of dynamically selecting and associating a service class on a per-packet basis, other embodiments dynamically select and associate a service class on a per-flow basis. Some of these embodiments perform this dynamic selection and association when processing the first packet of the flow.

Many of the above-described features and applications are implemented as software processes that are specified as a set of instructions recorded on a computer readable storage medium (also referred to as computer readable medium). When these instructions are executed by one or more processing unit(s) (e.g., one or more processors, cores of processors, or other processing units), they cause the processing unit(s) to perform the actions indicated in the instructions. Examples of computer readable media include, but are not limited to, CD-ROMs, flash drives, RAM chips, hard drives, EPROMs, etc. The computer readable media does not include carrier waves and electronic signals passing wirelessly or over wired connections.

In this specification, the term “software” is meant to include firmware residing in read-only memory or applications stored in magnetic storage, which can be read into memory for processing by a processor. Also, in some embodiments, multiple software inventions can be implemented as sub-parts of a larger program while remaining distinct software inventions. In some embodiments, multiple software inventions can also be implemented as separate programs. Finally, any combination of separate programs that together implement a software invention described here is within the scope of the invention. In some embodiments, the software programs, when installed to operate on one or more electronic systems, define one or more specific machine implementations that execute and perform the operations of the software programs.

FIG. 14 conceptually illustrates a computer system 1400 with which some embodiments of the invention are implemented. The computer system 1400 can be used to implement any of the above-described hosts, controllers, gateway and edge forwarding elements. As such, it can be used to execute any of the above described processes. This computer system includes various types of non-transitory machine readable media and interfaces for various other types of machine readable media. Computer system 1400 includes a bus 1405, processing unit(s) 1410, a system memory 1425, a read-only memory 1430, a permanent storage device 1435, input devices 1440, and output devices 1445.

The bus 1405 collectively represents all system, peripheral, and chipset buses that communicatively connect the numerous internal devices of the computer system 1400. For instance, the bus 1405 communicatively connects the processing unit(s) 1410 with the read-only memory 1430, the system memory 1425, and the permanent storage device 1435.

From these various memory units, the processing unit(s) 1410 retrieve instructions to execute and data to process in order to execute the processes of the invention. The processing unit(s) may be a single processor or a multi-core processor in different embodiments. The read-only-memory (ROM) 1430 stores static data and instructions that are needed by the processing unit(s) 1410 and other modules of the computer system. The permanent storage device 1435, on the other hand, is a read-and-write memory device. This device is a non-volatile memory unit that stores instructions and data even when the computer system 1400 is off. Some embodiments of the invention use a mass-storage device (such as a magnetic or optical disk and its corresponding disk drive) as the permanent storage device 1435.

Other embodiments use a removable storage device (such as a floppy disk, flash drive, etc.) as the permanent storage device. Like the permanent storage device 1435, the system memory 1425 is a read-and-write memory device. However, unlike storage device 1435, the system memory is a volatile read-and-write memory, such as random access memory. The system memory stores some of the instructions and data that the processor needs at runtime. In some embodiments, the invention's processes are stored in the system memory 1425, the permanent storage device 1435, and/or the read-only memory 1430. From these various memory units, the processing unit(s) 1410 retrieve instructions to execute and data to process in order to execute the processes of some embodiments.

The bus 1405 also connects to the input and output devices 1440 and 1445. The input devices enable the user to communicate information and select commands to the computer system. The input devices 1440 include alphanumeric keyboards and pointing devices (also called “cursor control devices”). The output devices 1445 display images generated by the computer system. The output devices include printers and display devices, such as cathode ray tubes (CRT) or liquid crystal displays (LCD). Some embodiments include devices such as touchscreens that function as both input and output devices.

Finally, as shown in FIG. 14, bus 1405 also couples computer system 1400 to a network 1465 through a network adapter (not shown). In this manner, the computer can be a part of a network of computers (such as a local area network (“LAN”), a wide area network (“WAN”), or an Intranet), or a network of networks (such as the Internet). Any or all components of computer system 1400 may be used in conjunction with the invention.

Some embodiments include electronic components, such as microprocessors, storage and memory that store computer program instructions in a machine-readable or computer-readable medium (alternatively referred to as computer-readable storage media, machine-readable media, or machine-readable storage media). Some examples of such computer-readable media include RAM, ROM, read-only compact discs (CD-ROM), recordable compact discs (CD-R), rewritable compact discs (CD-RW), read-only digital versatile discs (e.g., DVD-ROM, dual-layer DVD-ROM), a variety of recordable/rewritable DVDs (e.g., DVD-RAM, DVD-RW, DVD+RW, etc.), flash memory (e.g., SD cards, mini-SD cards, micro-SD cards, etc.), magnetic and/or solid state hard drives, read-only and recordable Blu-Ray® discs, ultra-density optical discs, any other optical or magnetic media, and floppy disks. The computer-readable media may store a computer program that is executable by at least one processing unit and includes sets of instructions for performing various operations. Examples of computer programs or computer code include machine code, such as is produced by a compiler, and files including higher-level code that are executed by a computer, an electronic component, or a microprocessor using an interpreter.

While the above discussion primarily refers to microprocessor or multi-core processors that execute software, some embodiments are performed by one or more integrated circuits, such as application specific integrated circuits (ASICs) or field programmable gate arrays (FPGAs). In some embodiments, such integrated circuits execute instructions that are stored on the circuit itself.

As used in this specification, the terms “computer”, “server”, “processor”, and “memory” all refer to electronic or other technological devices. These terms exclude people or groups of people. For the purposes of the specification, the terms “display” or “displaying” mean displaying on an electronic device. As used in this specification, the terms “computer readable medium,” “computer readable media,” and “machine readable medium” are entirely restricted to tangible, physical objects that store information in a form that is readable by a computer. These terms exclude any wireless signals, wired download signals, and any other ephemeral or transitory signals.

While the invention has been described with reference to numerous specific details, one of ordinary skill in the art will recognize that the invention can be embodied in other specific forms without departing from the spirit of the invention. For instance, several of the above-described embodiments deploy gateways in public cloud datacenters. However, in other embodiments, the gateways are deployed in a third party's private cloud datacenters (e.g., datacenters that the third party uses to deploy cloud gateways for different entities in order to deploy virtual networks for these entities).

Also, even though MIMS links are described as the QoS aware links in several examples above, one of ordinary skill will realize that other embodiments use other QoS aware links. For instance, some embodiments use QoS aware wireless links (such as 5G or later cellular links). Thus, one of ordinary skill in the art would understand that the invention is not to be limited by the foregoing illustrative details, but rather is to be defined by the appended claims. 

The invention claimed is:
 1. A method of monitoring health of a connection link between a first forwarding node of a wide area network (WAN) to a second forwarding node of the WAN, the link having a plurality of service classes and used for forwarding packets between the two nodes, the method comprising: at the second forwarding node: receiving service-class (SC) monitoring messages from the first forwarding node for a first service class; receiving SC monitoring messages from the first forwarding node for a second service class; based on the received SC monitoring messages, maintaining first and second operational states for the first and second service classes; and after detecting a change in the operational state of the first service class, sending a notification of the change to the first forwarding node, wherein the operational state of the first service class comprises a degraded state, which when detected causes at least one of the forwarding nodes to reduce using the first service class for forwarding packets to the other forwarding node.
 2. The method of claim 1, wherein the receiving, maintaining and detecting operations are performed for each service class of the link.
 3. The method of claim 1, wherein the receiving, maintaining and detecting operations are performed for each of only a subset of the service classes of the link, while using path quality metric (PQM) values maintained at the second forwarding node for the other service classes of the link to assess the state of the other service classes.
 4. The method of claim 3, wherein the subset of service classes comprises critical service classes, while the other service classes are not as critical as the subset of service classes.
 5. The method of claim 3 further comprising generating PQM values for each service class of the link while processing packets forwarded by the first forwarding node to the second forwarding node along each of the service classes.
 6. The method of claim 5, wherein the PQM values comprise at least one of loss values, delay values, and jitter values.
 7. The method of claim 1 further comprising: assigning an initial operational state of the first and second service classes to an operating state; and changing the operational state of the first service class from the operating state to a failed state.
 8. The method of claim 7, wherein the second service class is still in the operating state after the change to the operational state of the first service class.
 9. The method of claim 1 further comprising: assigning an initial operational state of the first and second service classes to an operating state; and changing the operational state of the first service class from the operating state to a degraded state.
 10. The method of claim 1, wherein the first and second forwarding nodes are two edge nodes connecting two different sites through a network link that is a Quality of Service (QoS) aware network link.
 11. A non-transitory machine readable medium storing a program for monitoring health of a connection link between a first forwarding node of a wide area network (WAN) to a second forwarding node of the WAN, the link having a plurality of service classes and used for forwarding packets between the two nodes, the program for execution by at least one processing unit of a second forwarding node and comprising sets of instructions for: receiving service-class (SC) monitoring messages from the first forwarding node for a first service class; receiving SC monitoring messages from the first forwarding node for a second service class, wherein the first and second service classes are associated with different quality of service (QoS) guarantees provided by the WAN to different sets of packet flows passing through the WAN; based on the received SC monitoring messages, maintaining first and second operational states for the first and second service classes; and after detecting a change in the operational state of the first service class, sending a notification of the change to the first forwarding node, wherein the operational state of the first service class comprises a failed state, which when detected causes at least one of the forwarding nodes to eliminate using the first service class for forwarding packets to the other forwarding node.
 12. The non-transitory machine readable medium of claim 11, wherein the sets of instructions for receiving, maintaining and detecting are executed for each service class of the link.
 13. The non-transitory machine readable medium of claim 11, wherein the sets of instructions for receiving, maintaining and detecting are executed for each of only a subset of the service classes of the link, while using path quality metric (PQM) values maintained at the second forwarding node for the other service classes of the link to assess the state of the other service classes.
 14. The non-transitory machine readable medium of claim 13, wherein the subset of service classes comprises critical service classes, while the other service classes are not as critical as the subset of service classes.
 15. The non-transitory machine readable medium of claim 13, wherein the program further comprises a set of instructions for generating PQM values for each service class of the link while processing packets forwarded by the first forwarding node to the second forwarding node along each of the service classes, the PQM values comprising at least one of loss values, delay values, and jitter values.
 16. The non-transitory machine readable medium of claim 11, wherein the program further comprises sets of instructions for: assigning an initial operational state of the first and second service classes to an operating state; and changing the operational state of the first service class from the operating state to a failed state.
 17. The non-transitory machine readable medium of claim 11, wherein the program further comprises sets of instructions for: assigning an initial operational state of the first and second service classes to an operating state; and changing the operational state of the first service class from the operating state to a degraded state.
 18. The non-transitory machine readable medium of claim 11, wherein the first and second forwarding nodes are two edge nodes connecting two different sites through a network link that is a Quality of Service (QoS) aware network link.
 19. The non-transitory machine readable medium of claim 11, wherein (i) the first service class is associated with a first set of service queues and with a first rate of retrieving packets from the first set of service queues, and (ii) the second service class is associated with a second set of service queues and a second rate of retrieving packets from the second set of service queues.
 20. The non-transitory machine readable medium of claim 19, wherein a plurality of packets in a first set of packet flows are buffered in the first set of service queues and a plurality of packets in a second set of packet flows are buffered in the second set of service queues. 